﻿using DAL.Repositories;
using Data.DBModels;
using Data.MyDbContext;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace WebIndex.Controllers
{
    public class TestController : Controller
    {
        //
        // GET: /Test/
        private WebStudioDbContext db = new WebStudioDbContext();

        public ActionResult Index()
        {

            Website site = db.Websites.First();
            Category cat = db.Categories.First();
            List<Category> cats = new List<Category>();
            cats.Add(cat);
            site.Categories = cats;
            new WebsiteRepository().Update(site);



            return View();
        }

    }
}
